.row
  .col-12
    .custom-filter-title
      = t("listings.form.price.price")
.row
  .col-12
    .custom-filter-options
      - id = ["range-slider", "price"].join("-")
      .range-slider{id: id}
        - min = MoneyUtil.to_units(MoneyUtil.to_money(@current_community.price_filter_min, @current_community.currency))
        - max = MoneyUtil.to_units(MoneyUtil.to_money(@current_community.price_filter_max, @current_community.currency))
        - range = [min, max]
        - start = [params["price_min"] || min, params["price_max"] || max]
        - labels = ["#price-filter-min-value", "#price-filter-max-value"]
        - fields = ["#price_min", "#price_max"]

        - content_for :extra_javascript do
          :javascript
            window.ST.rangeFilter("##{id}", #{range.to_json.html_safe}, #{start.to_json.html_safe}, #{labels.to_json.html_safe}, #{fields.to_json.html_safe}, false)

.row
  .col-12
    .left
      %span.custom-filter-min-max-title= t("homepage.custom_filters.min")
      %span{id: "price-filter-min-value"}
      %input{type: "hidden", id: "price_min", name: "price_min", value: params["price_min"]}
    .right
      %span.custom-filter-min-max-title= t("homepage.custom_filters.max")
      %span{id: "price-filter-max-value"}
      %input{type: "hidden", id: "price_max", name: "price_max", value: params["price_max"]}
